import service from './request'

const ngbUrl = import.meta.env.VITE_NGB_SERVER_URL

export const uploadNgbPic = (file) => {
    let formData = new FormData()
    formData.append('file', file)

    return service({
        method: 'post',
        url: ngbUrl + '/csp/api/utilurl/uploadFile?ygb=1',
        data: formData
    })
}

export const getPicUrlById = (picId) => {
    // return  'https://t-csp.wens.com.cn' + '/csp/api/utilurl/downloadFile?ygb=1&imageId=' + picId
    return ngbUrl + '/csp/api/utilurl/downloadFile?ygb=1&imageId=' + picId
}
